package com.fmc123.base.modules.entity ;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import com.fmc123.base.pesistence.BaseEntity;
/**
* @ClassName: SysUserRole
* @Description: 系统用户角色Entity 
* @author fmc
* @date 2015年11月14日下午3:22:07
*
 */
@Entity
@Table(name = "sys_user_role" )
public class SysUserRole extends BaseEntity {
    
    private static final long serialVersionUID = 1L;
    
    /**
     * 用户
     */
    @JoinColumn(name="USER_ID",referencedColumnName="ID")
    @ManyToOne(fetch=FetchType.EAGER,targetEntity=SysUser.class)
    private SysUser user ;
    
    /**
     * 角色
     */
    @JoinColumn(name="ROLE_ID",referencedColumnName="ID")
    @ManyToOne(fetch=FetchType.EAGER,targetEntity=SysRole.class)
    private SysRole role ;

    public SysUser getUser() {
      return user;
    }

    public void setUser(SysUser user) {
      this.user = user;
    }

    public SysRole getRole() {
      return role;
    }

    public void setRole(SysRole role) {
      this.role = role;
    }
    
}